/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package auditenergetic;
//import com.sun.org.apache.xerces.internal.parsers.SAXParser;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
import org.xml.sax.*;
import org.xml.sax.helpers.*;



public class Date_Cladire extends DefaultHandler{
      
    
        boolean an = false;
        boolean pereti = false;
        boolean tavane = false;
        boolean pardoseli = false;
        boolean tip_cladire = false;
        boolean nr_util = false;
        boolean scop = false;
       // boolean age = false;
       public void startElement(String nsURI, String strippedName,String tagName, Attributes attributes)
        throws SAXException
        {
            if (tagName.equalsIgnoreCase("an"))
                an = true;
            if (tagName.equalsIgnoreCase("pereti"))
                pereti = true;
            if(tagName.equalsIgnoreCase("tavane"))
                tavane = true;
            if (tagName.equalsIgnoreCase("pardoseli"))
                pardoseli = true;
            if (tagName.equalsIgnoreCase("tip_cladire"))
                tip_cladire = true;
            if(tagName.equalsIgnoreCase("nr_util"))
                nr_util = true;
             if(tagName.equalsIgnoreCase("scop"))
                scop = true;

        }
        public void characters(char[] ch,int start, int length)
        {
            if (an)
            {
                System.out.println("An proiectare: " + new String(ch,start,length));
                an = false;
            } else if (pereti)
            {
                System.out.println("Pereti: " + new String(ch,start,length));
                pereti = false;
            } else if (tavane)
            {

                System.out.println("Tavane: "+new String(ch,start,length));
                tavane = false;
            }else if(pardoseli)
            {
                 System.out.println("Pardoseli: "+new String(ch,start,length));
                 pardoseli = false;
            }else if(tip_cladire)
            {
                 System.out.println("Cladire: "+new String(ch,start,length));
                 tip_cladire = false;
            }else if(nr_util)
            {
                 System.out.println("Nr. Utilizatori: "+new String(ch,start,length));
                 nr_util = false;
            }else if(scop)
            {
                 System.out.println("Scopul elaborarii certificatului energetic: "+new String(ch,start,length));
                 scop = false;
            }

        }
    }
   


